package com.xuecheng.learning.service;

import com.xuecheng.base.model.PageResult;
import com.xuecheng.learning.model.dto.MyCourseTableParams;
import com.xuecheng.learning.model.dto.XcChooseCourseDto;
import com.xuecheng.learning.model.dto.XcCourseTablesDto;
import com.xuecheng.learning.model.po.XcCourseTables;

/**
 * @description: 选课的相关接口
 * @author: ajie
 * @date: 2024/2/1 21:10:44
 * @version: 1.0
 */
public interface MyCourseTablesService {

    /**
     * @description: 添加选课
     * @params: [userId, courseId]       
     * @return: 
     * @author: ajie
     * @date: 2024/2/1 21:14
     */
    public XcChooseCourseDto addChooseCourse(String userId, Long courseId);

    /**
     * @description 判断学习资格
     * @param userId
     * @param courseId
     * @return XcCourseTablesDto 学习资格状态 [{"code":"702001","desc":"正常学习"},{"code":"702002","desc":"没有选课或选课后没有支付"},{"code":"702003","desc":"已过期需要申请续期或重新支付"}]
     * @author ajie
     * @date 2022/10/3 7:37
     */
    public XcCourseTablesDto getLearningStatus(String userId, Long courseId);
    
    /**
     * @description: 保存选课成功状态 
     * @params: [chooseCourseId]       
     * @return: 
     * @author: ajie
     * @date: 2024/2/6 20:08
     */
    public boolean saveChooseCourseSuccess(String chooseCourseId);

    /**
     * @description: 查询我的课程表
     * @params: [params]
     * @return:
     * @author: ajie
     * @date: 2024/2/7 20:39
     */
    public PageResult<XcCourseTables> mycoursetables(MyCourseTableParams params);

}
